package com.leetcode.链表操作.两数相加;

/**
 * <p>
 * private / public / protected / 默认：这四种变量or方法的访问权限，变量能否被访问到受限于"变量or方法的访问权限"。
 * </p>
 * @author: Sunny
 * @date: 2021/3/10
 * @version: v1.0.0
 */
public class VariableTest {

    public static void main(String[] args) {
        VariableTest variableTest = new VariableTest();
        Test1 test1 = new Test1("zhangsan", "11");
        variableTest.test(test1);
    }

    public void test(Test1 test1) {
        System.out.println(test1.age);
        System.out.println(test1.name);
    }

    static class Test1 {

        private String name;

        private String age;

        public Test1(String name, String age) {
            this.name = name;
            this.age = age;
        }
    }

}
